#pragma once
#pragma warning ( disable: 4244 )

#include <log4cplus/logger.h>
#include <log4cplus/configurator.h>
#include <string>
#include <iomanip>
#include <algorithm>
#include "Globals.h"

// Logger names (these MUST be the same as specified in logger.config)
#define GAME_LOG "GAME"
#define GAMEENGINE_LOG "GAMEENGINE"

namespace game_engine { namespace utils
{

/*!
 * \class Logger
 * \brief 
 */
class Logger
{
///////////////////////////////////////////////////////////////////////////////
// Attribute definition
///////////////////////////////////////////////////////////////////////////////
public:
    typedef enum {
        DEBUG_MODE,
	    RELEASE_MODE
    } ConfigType;

///////////////////////////////////////////////////////////////////////////////
// Method definition
///////////////////////////////////////////////////////////////////////////////
public:
    // Constructors and Destructors
    Logger(void);
    virtual ~Logger(void);

    // Others
    static void configure(const string &propFilename);
    static void setLogLevel(const ConfigType &type);
    static void TRACE(const string &logName, const string &msg);
    static void DEBUG(const string &logName, const string &msg);
    static void INFO(const string &logName, const string &msg);
    static void WARN(const string &logName, const string &msg);
    static void ERR(const string &logName, const string &msg);
    static void FATAL(const string &logName, const string &msg);

private:
    static wstring stringToWString(const string& s);
    static string wstringToString(const wstring& s);

};

}}
